

-module( chat_topic_sl ).

-author( "chenyiming" ).

-import(proplists, [get_value/2]).

-export([ handle/1 ]).

handle( Params ) ->
    {ok,Im} =       application:get_env(ham_server, emqttd),
  	AppUid =        get_value(<<"send_uid">>,  Params),
	ToUsername =    get_value(<<"to_list">>,    Params),
	TopicType =       get_value(<<"topic_type">>,       Params),
	Content =       get_value(<<"content">>,        Params),
	cast_svc:cast(Im, emqttd_ham, to_msg_ham_topic_list, [AppUid, ToUsername, packet_id, list_to_atom(util:a2l(TopicType)), Content]),
	{ok, [{<<"code">>,0}]}.



